import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import RouVuex from '@/components/vuex使用'
import Dtys from '@/components/动态样式'
import Ssbs from '@/components/搜索变色'
import Zjfz from '@/components/组件封装'
import Jsfssy from '@/components/js方法使用'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
    path: '/',
    name: 'HelloWorld',
    component: HelloWorld
  },
  {
    path: '/Dtys',
    name: 'Dtys',
    component: Dtys
  },
  {
    path: '/Ssbs',
    name: 'Ssbs',
    component: Ssbs
  },
    //   参数路由，id为参数。id后面有？号表示参数可以传可以不传
  {
    path: '/Zjfz/:id?',
    name: 'Zjfz',
    component: Zjfz
  },
  {
    path: '/Jsfssy',
    name: 'Jsfssy',
    component: Jsfssy
  },
  {
    path: '/RouVuex',
    name: 'RouVuex',
    component: RouVuex
  }
  ]
})
